﻿using ZKLT25.API.Helper;
using ZKLT25.API.IServices.Dtos;

namespace ZKLT25.API.IServices
{
    public interface IAskService
    {
        #region 阀体型号服务接口
        /// <summary>
        /// 分页查询阀体型号列表
        /// </summary>
        /// <param name="qto">查询条件</param>
        /// <returns></returns>
        Task<ResultModel<PaginationList<Ask_FTListDto>>> GetFTPagedListAsync(Ask_FTListQto qto);

        /// <summary>
        /// 创建阀体型号
        /// </summary>
        /// <param name="cto">创建请求</param>
        /// <returns></returns>
        Task<ResultModel<bool>> CreateFTAsync(Ask_FTListCto cto);

        /// <summary>
        /// 更新阀体型号
        /// </summary>
        /// <param name="id">主键ID</param>
        /// <param name="uto">更新请求</param>
        /// <returns></returns>
        Task<ResultModel<bool>> UpdateFTAsync(int id, Ask_FTListUto uto);

        /// <summary>
        /// 删除阀体型号
        /// </summary>
        /// <param name="id">主键ID</param>
        /// <returns></returns>
        Task<ResultModel<bool>> DeleteFTAsync(int id);

        /// <summary>
        /// 检查阀体型号是否存在
        /// </summary>
        /// <param name="ftVersion">阀体型号</param>
        /// <param name="excludeId">排除的ID(用于编辑时检查)</param>
        /// <returns></returns>
        Task<ResultModel<bool>> ExistsFTAsync(string ftVersion, int? excludeId = null);

        /// <summary>
        /// 批量更新系数
        /// </summary>
        /// <param name="ids">要更新的记录ID列表</param>
        /// <param name="ratio">新的系数值</param>
        /// <returns></returns>
        Task<ResultModel<bool>> BatchUpdateFTRatioAsync(List<int> ids, double ratio);
        #endregion

        #region 附件服务接口
        /// <summary>
        /// 分页查询附件列表
        /// </summary>
        /// <param name="qto">查询条件</param>
        /// <returns></returns>
        Task<ResultModel<PaginationList<Ask_FJListDto>>> GetFJPagedListAsync(Ask_FJListQto qto);

        /// <summary>
        /// 批量更新系数
        /// </summary>
        /// <param name="ids">要更新的记录ID列表</param>
        /// <param name="ratio">新的系数值</param>
        /// <returns></returns>
        Task<ResultModel<bool>> BatchUpdateFJRatioAsync(List<int> ids, double ratio);
        #endregion

        #region 阀体 / 附件日志服务接口
        /// <summary>
        /// 分页查询阀体 / 附件日志
        /// </summary>
        /// <param name="qto">查询条件（MainID 和 DataType ）</param>
        /// <returns>分页日志列表</returns>
        Task<ResultModel<PaginationList<Ask_FTFJListLogDto>>> GetFTFJLogPagedListAsync(Ask_FTFJListLogQto qto);
        #endregion
    }
}
